package com.demo.understandmvc.handler.httpRequestHandler;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.HttpRequestHandler;

/**HttpRequestHandler是一种比较简单的handler，只有一个handleRequest方法，传入HttpServletRequest、HttpServletResponse，没有返回值
 * <br/>只能处理简单的http请求，不涉及复杂的过程，执行完handleRequest方法执行就结束了
 * @author zhangsulei
 *
 */
public class MyHttpRequestHandler implements HttpRequestHandler {

	@Override
	public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// 使用response的write输出一些文字
		response.getWriter().println("hello HttpRequestHandler");
	}

}
